package com.leolian.spring02.transaction.demo3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Lian
 * Service实现类
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {
	
	@Autowired
	private AccountDao accountDao;
	
	
	public void transfer(final String out,final String in,final Double money) {
		accountDao.decrMoney(out, money);
		int i = 1 / 0;
		accountDao.incrMoney(in, money);
	}

}
